if (typeof $CONFIG == "undefined" || !$CONFIG) {
    $CONFIG = {}
}
var scope = $CONFIG;
Function.prototype.bind2 = function(b) {
    var a = this;
    return function() {
        return a.apply(b, arguments)
    }
};
scope.isWeiboHost = false;
scope.$VERSION = "t35";
scope.$BASEHOST = "http://timg.sjs.sinajs.cn/";
scope.$BASEIMG = scope.$BASECSS = scope.$BASEHOST = "http://timg.sjs.sinajs.cn/" + scope.$VERSION + "/";
scope.$OPENTIMG = scope.$BASEHOST + "/appstyle/opent/";
scope.$BASESTYLE = scope.$BASEHOST + "style/";
scope.$BLANKIMG = scope.$BASESTYLE + "images/common/transparent.gif";
scope.$BASEJS = "http://tjs.sjs.sinajs.cn/" + scope.$VERSION + "/";
scope.$BASESTATIC = "http://tjs.sjs.sinajs.cn/" + scope.$VERSION + "/";
scope.$BASEHOST = /weibo.com/.test(location.hostname) ? "weibo.com": "t.sina.com.cn";
scope._ua = navigator.userAgent.toLowerCase();
scope.$IE = /msie/.test(scope._ua);
scope.$OPERA = /opera/.test(scope._ua);
scope.$MOZ = /gecko/.test(scope._ua);
scope.$IE5 = /msie 5 /.test(scope._ua);
scope.$IE55 = /msie 5.5/.test(scope._ua);
scope.$IE6 = /msie 6/.test(scope._ua);
scope.$IE7 = /msie 7/.test(scope._ua);
scope.$SAFARI = /safari/.test(scope._ua);
scope.$winXP = /windows nt 5.1/.test(scope._ua);
scope.$winVista = /windows nt 6.0/.test(scope._ua);
var $IE = scope.$IE,
$MOZ = scope.$MOZ,
$IE6 = scope.$IE6;
function $Import(a) {}
var Boot = {};
Boot.addDOMLoadEvent = function(a) {
    if (!window.__load_events) {
        var b = function() {
            if (arguments.callee.done) {
                return
            }
            arguments.callee.done = true;
            if (window.__load_timer) {
                clearInterval(window.__load_timer);
                window.__load_timer = null
            }
            for (var c = 0; c < window.__load_events.length; c++) {
                window.__load_events[c]()
            }
            window.__load_events = null
        };
        if (document.addEventListener) {
            document.addEventListener("DOMContentLoaded", b, false)
        }
        if (/WebKit/i.test(navigator.userAgent)) {
            window.__load_timer = setInterval(function() {
                if (/loaded|complete/.test(document.readyState)) {
                    b()
                }
            },
            10)
        }
        if (window.ActiveXObject) {
            window.__load_timer = setInterval(function() {
                try {
                    document.body.doScroll("left");
                    b()
                } catch(c) {}
            },
            10)
        }
        window.onload = b;
        window.__load_events = []
    }
    window.__load_events.push(a)
};
Boot.getJsVersion = function() {
    var a = false;
    if ($CONFIG) {
        a = $CONFIG.js ? $CONFIG.js: ""
    }
    if (a) {
        return "?v=" + a
    } else {
        return ""
    }
};
try {
    Boot.addDOMLoadEvent(main)
} catch(e) {}
var $Debug = (function() {
    var a = [];
    function c(f, l, d) {
        var g;
        var k = f != null ? f: "";
        var h = {
            color: null,
            bgcolor: null,
            html: null
        };
        var j = d != null ? d: "log";
        l = l != null ? l: {};
        for (g in h) {
            if (l[g] != null) {
                h[g] = l[g]
            }
        }
        a.push({
            label: k,
            cmd: j,
            opts: h,
            time: new Date()
        })
    }
    function b(d, f) {
        c(d, f, "log")
    }
    b.fatal = function(d, f) {
        c(d, f, "fatal")
    };
    b.error = function(d, f) {
        c(d, f, "error")
    };
    b.warning = function(d, f) {
        c(d, f, "warning")
    };
    b.info = function(d, f) {
        c(d, f, "info")
    };
    b.log = function(d, f) {
        c(d, f, "log")
    };
    b.clear = function() {
        a = []
    };
    b.contentList = a;
    return b
})();
if (typeof trace == "undefined") {
    trace = traceError = $Debug
}
if (typeof Sina == "undefined") {
    Sina = {}
}
Sina.pkg = function(c) {
    if (!c || !c.length) {
        return null
    }
    var d = c.split(".");
    var b = Sina;
    for (var a = (d[0] == "Sina") ? 1: 0; a < d.length; ++a) {
        b[d[a]] = b[d[a]] || {};
        b = b[d[a]]
    }
    return b
};
function $E(b) {
    var a = typeof b == "string" ? document.getElementById(b) : b;
    if (a != null) {
        return a
    } else {}
    return null
}
function $C(a) {
    return document.createElement(a)
}
try {
    document.execCommand("BackgroundImageCache", false, true)
} catch(e) {}
if (typeof Jobs == "undefined") {
    var Jobs = {}
} (function() {
    var d = false;
    var f = [];
    var g;
    var a = function(j, k) {
        var h = function() {
            setTimeout(function() {
                var l = new Date();
                try {
                    j.call(document)
                } catch(m) {
                    $Debug.fatal("<b>Job [" + k + "] 执行失败!</b><br/>&nbsp;" + m.name + "<br/>&nbsp;" + (m.message || m.description) + (m.fileName ? "<br/>&nbsp;" + m.fileName: "") + (m.lineNumber ? "<br/>&nbsp;" + m.lineNumber: ""), {
                        html: true
                    })
                } finally {
                    $Debug.info("<b>Job [" + k + "] 执行(" + (new Date() - l) + "毫秒)</b>", {
                        html: true
                    })
                }
            },
            10)
        };
        if (d) {
            h()
        } else {
            f.push(h)
        }
        return this
    };
    var b = function() {
        for (var h = 0; h < f.length; h++) {
            f[h]()
        }
        f = null
    };
    var c = function(h) {
        if (d) {
            return
        }
        d = true;
        b.call(window);
        if (document.removeEventListener) {
            document.removeEventListener("DOMContentLoaded", c, false)
        } else {
            if (document.attachEvent) {
                document.detachEvent("onreadystatechange", c);
                if (window == window.top) {
                    clearInterval(g);
                    g = null
                }
            }
        }
    };
    if (document.addEventListener) {
        document.addEventListener("DOMContentLoaded", c, false)
    } else {
        if (document.attachEvent) {
            document.attachEvent("onreadystatechange", 
            function() {
                if ((/loaded|complete/).test(document.readyState)) {
                    c()
                }
            });
            if (window == window.top) {
                g = setInterval(function() {
                    try {
                        d || document.documentElement.doScroll("left")
                    } catch(h) {
                        return
                    }
                    c()
                },
                500)
            }
        }
    }
    Jobs.regist = function(j, h) {
        a(h, j)
    }
})();
if (typeof App == "undefined") {
    var App = {}
}
Sina.pkg("Core");
if (typeof Core == "undefined") {
    Core = Sina.Core
}
Sina.pkg("Core.String");
Core.String.trimHead = function(a) {
    return a.replace(/^(\u3000|\s|\t)*/gi, "")
};
Core.String.trimTail = function(a) {
    return a.replace(/(\u3000|\s|\t)*$/gi, "")
};
Core.String.trim = function(a) {
    return Core.String.trimHead(Core.String.trimTail(a))
};
Sina.pkg("Core.Events");
Core.Events.addEvent = function(g, d, c, a) {
    var f = $E(g);
    if (f == null) {
        $Debug("addEvent 找不到对象：" + g);
        return
    }
    if (typeof a == "undefined") {
        a = false
    }
    if (typeof c == "undefined") {
        c = "click"
    }
    if (f.addEventListener) {
        f.addEventListener(c, d, a);
        return true
    } else {
        if (f.attachEvent) {
            var b = f.attachEvent("on" + c, d);
            return true
        } else {
            f["on" + c] = d
        }
    }
}; (function(a) {
    var b = Core.Events.addEvent;
    var c = Core.String.trim;
    a.checkForm = function(g) {
        var d = {};
        var f = {};
        d.add = function(k, m, j, h, l) {
            f[k] = a.checkItem(k, m, j, g, h, l)
        };
        d.check = function(n) {
            var l = true;
            if (n) {
                for (var m = 0, h = n.length; m < h; m += 1) {
                    if (f[n[m]]) {
                        if (!f[n[m]].check()) {
                            f[n[m]].changeUI(false);
                            l = false
                        }
                    }
                }
            } else {
                for (var j in f) {
                    if (!f[j].check()) {
                        f[j].changeUI(false);
                        l = false
                    }
                }
            }
            return l
        };
        d.toggleError = function(l, j) {
            for (var k = 0, h = l.length; k < h; k += 1) {
                if (f[l[k]]) {
                    f[l[k]].changeUI(j);
                    return true
                }
            }
            return false
        };
        d.showError = function(h) {
            this.toggleError(h, false)
        };
        d.hideError = function(h) {
            this.toggleError(h, true)
        };
        return d
    };
    a.checkItem = function(m, k, j, n, d, l) {
        var h = {};
        if (l === undefined) {
            if (k.type === "text" || k.type === "password" || k.tagName === "TEXTAREA") {
                l = "blur"
            } else {
                if (k.tagName === "SELECT") {
                    l = "change"
                } else {
                    l = "click"
                }
            }
        }
        if (d === undefined) {
            d = function(o) {
                if (c(o.value) === "") {
                    return false
                } else {
                    return true
                }
            }
        }
        h.changeUI = function(o) {
            n(m, o, k, j)
        };
        h.check = function() {
            var o = d(k);
            n(m, o, k, j);
            return o
        };
        h.getAttr = function() {};
        if (k.tagName !== "SELECT" && k.length) {
            for (var f = 0, g = k.length; f < g; f += 1) {
                b(k[f], 
                function() {
                    h.check()
                },
                l)
            }
        } else {
            b(k, 
            function() {
                h.check()
            },
            l)
        }
        return h
    }
})(App); (function(b) {
    b.checkEml = function(d) {
        if (!/^[\.\w]([(\/)(\-)(\+).\w])*@([(\-)\w]{1,64}\.){1,7}[(\-)\w]{1,64}$/.test(d)) {
            return false
        } else {
            if (d && d != "" && (d.indexOf("@") != -1)) {
                var c = d.indexOf("@");
                var f = d.substring(0, c);
                if (f.length > 64 || d.length > 256) {
                    return false
                } else {
                    return true
                }
            }
        }
        return false
    };
    b.checkEmpty = function(c) {
        if (!c) {
            return false
        }
        if (! (c instanceof String)) {
            c = c.toString()
        }
        if ((Core.String.trim(c)).length) {
            return true
        } else {
            return false
        }
    };
    b.checkRealName = function(c) {
        if (new RegExp("^[\u4e00-\u9fa5]{2,6}$").test(c)) {
            return true
        } else {
            if (new RegExp("^[a-z]{2,20}$").test(c)) {
                return true
            } else {
                if (new RegExp("^[a-z\u4e00-\u9fa5]{2,6}$")) {
                    return true
                } else {
                    return false
                }
            }
        }
    };
    var a = function(c) {
        return function(d) {
            if (new RegExp(c).test(d)) {
                return true
            } else {
                return false
            }
        }
    };
    b.checkQQNum = function(c) {
        if (new RegExp("^[1-9][0-9]{4,11}$").test(c)) {
            return true
        } else {
            if (b.checkEml(c)) {
                return true
            } else {
                return false
            }
        }
    };
    b.checkUCNum = function(c) {
        if (new RegExp("^[1-9][0-9]{4,9}$").test(c)) {
            return true
        } else {
            return false
        }
    };
    b.checkMobile = a("^1[34578](\\d{9})+$");
    b.checkTrName = a("^[\u4e00-\u9fa5]{2,6}$");
    b.checkNickSp = a("^[0-9a-zA-Z\u4e00-\u9fa5_]*$");
    b.checkTrueNm = a("^[a-zA-Z·s.\u4e00-\u9fa5]*$");
    b.checkSkype1 = a("^[0-9a-zA-Z](-|w){3}(-|w)*$");
    b.checkSkype2 = a("[!#@%&/'\"$^*()+=[]{}?;:<>|~`\x80-\xff\\]");
    b.checkImgURI = a("(.jpg|.gif|.png|.JPG|.GIF|.PNG)$");
    b.checkURL = a("^(http|https):\\/\\/([\\w-]+(\\.[\\w-]+)+(\\:\\d+)?(\\/[\\w-   .\\/\\?%&+=\\u4e00-\\u9fa5]*)?)?$");
    b.checkURLoose = a("^([^://])+\\:\\/\\/([^\\.]+)(\\.)(.+)([^\\.]+)$");
    b.checkMiniName = a("^[0-9a-zA-Z\u4e00-\u9fa5_-]*$");
    b.checkIdCard = a("^(([0-9]{15})|([0-9]{18})|([0-9]{17}(x|X)))$");
    b.checkSchool = function(c) {
        if (new RegExp("'|\"|<|>|[|]", "g").test(c)) {
            return false
        } else {
            return true
        }
    };
    b.checkCompany = function(c) {
        if (new RegExp("'|\"|<|>|[|]", "g").test(c)) {
            return false
        } else {
            return true
        }
    };
    b.checkMobileCheckCode = a("^[0-9a-z]{6}$");
    b.checkSepicalSymbol = function(c) {
        if (new RegExp("[,|;|<|>]", "g").test(c)) {
            return true
        } else {
            return false
        }
    };
    b.checkPwdPower = function(g, f, d) {
        var c = (g.length - f) / (d - f);
        var h = 0;
        if (/[A-Z]/g.test(g)) {
            h += 0.273
        }
        if (/[a-z]/g.test(g)) {
            h += 0.273
        }
        if (/[0-9]/g.test(g)) {
            h += 0.114
        }
        if (/[^0-9a-zA-Z]/g.test(g)) {
            h += 0.34
        }
        return c / 2 + h / 2
    };
    b.checkPwdPowerNew = function(g) {
        function f(j) {
            if (j >= 65 && j <= 90) {
                return 2
            }
            if (j >= 97 && j <= 122) {
                return 4
            } else {
                return 1
            }
        }
        function d(j) {
            var k = 0;
            for (i = 0; i < 3; i++) {
                if (j & 1) {
                    k++
                }
                j >>>= 1
            }
            return k
        }
        var c = 0;
        for (i = 0; i < g.length; i++) {
            c |= f(g.charCodeAt(i))
        }
        var h = d(c);
        if (g.length >= 10) {
            h++
        }
        switch (h) {
        case 1:
            return 1;
        case 2:
            return 2;
        case 3:
            return 3;
        default:
            return 1
        }
    }
})(App);
Sina.pkg("Core.Array");
Core.Array.foreach = function(d, c) {
    if (d == null && d.constructor != Array) {
        return []
    }
    var f = 0,
    b = d.length,
    g = [];
    while (f < b) {
        var a = c(d[f], f);
        if (a !== null) {
            g[g.length] = a
        }
        f++
    }
    return g
};
Core.Array.findit = function(a, c) {
    var b = -1;
    Core.Array.foreach(a, 
    function(f, d) {
        if (c == f) {
            b = d
        }
    });
    return b
};
Core.Array.uniq = function(c) {
    var b = [];
    for (var d = 0; d < c.length; d++) {
        var a = c[d];
        if (Core.Array.findit(b, a) == -1) {
            b.push(a)
        }
    }
    return b
};
App.nameValue = function(k, b) {
    var j = k.getAttribute("name");
    var d = k.getAttribute("type");
    var h = k.tagName;
    var l = {
        name: j,
        value: ""
    };
    var f = function(m) {
        if (m === false) {
            l = false;
            return false
        }
        if (!l.value) {
            l.value = Core.String.trim(m || "")
        } else {
            l.value = [Core.String.trim(m || "")].concat(l.value)
        }
    };
    if (!k.disabled && j) {
        switch (h) {
        case "INPUT":
            if (d == "radio" || d == "checkbox") {
                if (k.checked) {
                    f(k.value)
                } else {
                    f(false)
                }
            } else {
                if (d == "reset" || d == "submit" || d == "image") {
                    f(false)
                } else {
                    f(b ? (k.value || false) : k.value)
                }
            }
            break;
        case "SELECT":
            if (k.multiple) {
                var a = k.options;
                for (var c = 0, g = a.length; c < g; c++) {
                    if (a[c].selected) {
                        f(a[c].value)
                    }
                }
            } else {
                f(k.value)
            }
            break;
        case "TEXTAREA":
            f(k.value || k.getAttribute("value") || false);
            break;
        case "BUTTON":
        default:
            f(k.value || k.getAttribute("value") || k.innerHTML || false)
        }
    } else {
        f(false)
    }
    return l
};
App.htmlToJson = function(h, b, d) {
    var m = {};
    b = Core.Array.uniq(b || ["INPUT", "TEXTAREA", "BUTTON", "SELECT"]);
    if (!h || !b) {
        return false
    }
    var a = App.nameValue;
    for (var f = 0, g = b.length; f < g; f++) {
        var l = h.getElementsByTagName(b[f]);
        for (var c = 0, k = l.length; c < k; c++) {
            var n = a(l[c], d);
            if (!n) {
                continue
            }
            if (m[n.name]) {
                if (m[n.name] instanceof Array) {
                    m[n.name] = m[n.name].concat(n.value)
                } else {
                    m[n.name] = [m[n.name]].concat(n.value)
                }
            } else {
                m[n.name] = n.value
            }
        }
    }
    return m
};
Core.String.byteLength = function(b) {
    if (typeof b == "undefined") {
        return 0
    }
    var a = b.match(/[^\x00-\x80]/g);
    return (b.length + (!a ? 0: a.length))
};
Core.Events.fireEvent = function(b, c) {
    b = $E(b) || b;
    if (b.addEventListener) {
        var a = document.createEvent("HTMLEvents");
        a.initEvent(c, true, true);
        b.dispatchEvent(a)
    } else {
        b.fireEvent("on" + c)
    }
};
Core.Events.removeEvent = function(a, b, c) {
    var d = $E(a);
    if (d == null) {
        $Debug("removeEvent 找不到对象：" + a);
        return
    }
    if (typeof b != "function") {
        return
    }
    if (typeof c == "undefined") {
        c = "click"
    }
    if (d.addEventListener) {
        d.removeEventListener(c, b, false)
    } else {
        if (d.attachEvent) {
            d.detachEvent("on" + c, b)
        }
    }
    b[c] = null
};
Sina.pkg("Core.Base"); (function() {
    var a = function() {
        var b = navigator.userAgent.toLowerCase();
        this.$IE = /msie/.test(b);
        this.$OPERA = /opera/.test(b);
        this.$MOZ = /gecko/.test(b);
        this.$IE5 = /msie 5 /.test(b);
        this.$IE55 = /msie 5.5/.test(b);
        this.$IE6 = /msie 6/.test(b);
        this.$IE7 = /msie 7/.test(b);
        this.$SAFARI = /safari/.test(b);
        this.$winXP = /windows nt 5.1/.test(b);
        this.$winVista = /windows nt 6.0/.test(b);
        this.$FF2 = /Firefox\/2/i.test(b);
        this.$IOS = /\((iPhone|iPad|iPod)/i.test(b)
    };
    Core.Base.detect = new a()
})();
Core.Events.getEvent = function() {
    return window.event
};
if (!Core.Base.detect.$IE) {
    Core.Events.getEvent = function() {
        if (window.event) {
            return window.event
        }
        var b = arguments.callee.caller;
        var a;
        var c = 0;
        while (b != null && c < 40) {
            a = b.arguments[0];
            if (a && (a.constructor == Event || a.constructor == MouseEvent)) {
                return a
            }
            c++;
            b = b.caller
        }
        return a
    }
}
Core.Events.stopEvent = function(a) {
    var b = a ? a: Core.Events.getEvent();
    b.cancelBubble = true;
    b.returnValue = false
};
if (!$IE) {
    Core.Events.stopEvent = function(a) {
        var b = a ? a: Core.Events.getEvent();
        b.preventDefault();
        b.stopPropagation()
    }
}
Core.Events.fixEvent = function(a) {
    if (typeof a == "undefined") {
        a = window.event
    }
    if (!a.target) {
        a.target = a.srcElement;
        a.pageX = a.x;
        a.pageY = a.y
    }
    if (typeof a.layerX == "undefined") {
        a.layerX = a.offsetX
    }
    if (typeof a.layerY == "undefined") {
        a.layerY = a.offsetY
    }
    return a
};
Sina.pkg("Core.Dom");
Core.Dom.opacity = function(b, a) {
    b = $E(b);
    b.style.filter = "alpha(opacity=" + a + ")";
    b.style.opacity = a / 100
};
Core.Dom.getElementsByClass = function(c, b, h) {
    c = c || document;
    var d = [];
    h = " " + h + " ";
    var k = c.getElementsByTagName(b),
    g = k.length;
    for (var f = 0; f < g; ++f) {
        var a = k[f];
        if (a.nodeType == 1) {
            var j = " " + a.className + " ";
            if (j.indexOf(h) != -1) {
                d[d.length] = a
            }
        }
    }
    return d
};
Core.Dom.byClz = Core.Dom.getElementsByClass;
Sina.pkg("Utils");
if (typeof Utils == "undefined") {
    Utils = Sina.Utils
}
Sina.pkg("Core.Function");
Core.Function.bind2 = function(c, b) {
    var a = c;
    return function() {
        return a.apply(b, arguments)
    }
};
Function.prototype.bind2 = function(b) {
    var a = this;
    return function() {
        return a.apply(b, arguments)
    }
};
Utils.Template = function(a) {
    this.tmpl = a;
    this.pattern = /(#\{(.*?)\})/g
};
Utils.Template.prototype = {
    evaluate: function(a) {
        return this.tmpl.replace(this.pattern, 
        function() {
            return a[arguments[2]] || ""
        })
    },
    evaluateMulti: function(c, a) {
        var b = [];
        Core.Array.foreach(c, Core.Function.bind2(function(d, f) {
            f = a ? c.length - f: f;
            b[f] = this.evaluate(d)
        },
        this));
        return b.join("")
    }
};
Sina.pkg("Core.System");
Core.System.winSize = function(b) {
    var a,
    c;
    if (b) {
        target = b.document
    } else {
        target = document
    }
    if (self.innerHeight) {
        if (b) {
            target = b.self
        } else {
            target = self
        }
        a = target.innerWidth;
        c = target.innerHeight
    } else {
        if (target.documentElement && target.documentElement.clientHeight) {
            a = target.documentElement.clientWidth;
            c = target.documentElement.clientHeight
        } else {
            if (target.body) {
                a = target.body.clientWidth;
                c = target.body.clientHeight
            }
        }
    }
    return {
        width: a,
        height: c
    }
};
Core.System.pageSize = function(c) {
    if (c) {
        target = c.document
    } else {
        target = document
    }
    var f = (target.compatMode == "CSS1Compat" ? target.documentElement: target.body);
    var d,
    b;
    if (window.innerHeight && window.scrollMaxY) {
        d = f.scrollWidth;
        b = window.innerHeight + window.scrollMaxY
    } else {
        if (f.scrollHeight > f.offsetHeight) {
            d = f.scrollWidth;
            b = f.scrollHeight
        } else {
            d = f.offsetWidth;
            b = f.offsetHeight
        }
    }
    var a = Core.System.winSize(c);
    if (b < a.height) {
        pageHeight = a.height
    } else {
        pageHeight = b
    }
    if (d < a.width) {
        pageWidth = a.width
    } else {
        pageWidth = d
    }
    return [pageWidth, pageHeight, a.width, a.height]
};
Core.System.getScrollPos = function(c) {
    c = c || document;
    var a = c.documentElement;
    var b = c.body;
    return [Math.max(a.scrollTop, b.scrollTop), Math.max(a.scrollLeft, b.scrollLeft), Math.max(a.scrollWidth, b.scrollWidth), Math.max(a.scrollHeight, b.scrollHeight)]
};
App.Dialog = {};
App.Dialog.BasicDialog = function(j, g, a) {
    this._node = $C("div");
    document.getElementsByTagName("BODY")[0].appendChild(this._node);
    var c = {
        title: j ? j: "BasicDialog",
        content: g ? g: "......"
    };
    var f = this._node.style;
    f.position = "absolute";
    f.visibility = "hidden";
    if (!a) {
        a = {}
    }
    if (a.zIndex) {
        f.zIndex = a.zIndex
    }
    if (a.hidden) {
        f.visibility = "hidden"
    }
    var h = '<table class="mBlogLayer"><tbody><tr><td class="top_l"></td><td class="top_c"></td><td class="top_r"></td></tr><tr><td class="mid_l"></td><td class="mid_c"><div class="layerBox"><div class="layerBoxTop"><div class="topCon"><strong>#{title}</strong><a href="javascript:;" class="close"></a><div class="clearit"></div></div></div><div class="layerBoxCon">#{content}</div></div></td><td class="mid_r"></td></tr>			    	<tr><td class="bottom_l"></td><td class="bottom_c"></td><td class="bottom_r"></td></tr>			    <tbody></table>';
    var d = new Utils.Template(h);
    this._node.innerHTML = d.evaluate(c);
    this._node_body = Core.Dom.getElementsByClass(this._node, "DIV", "layerBoxCon")[0];
    this.setSize(a.width, a.height);
    this._btn_close = this._node.firstChild.firstChild.childNodes[1].childNodes[1].firstChild.firstChild.firstChild.childNodes[1];
    this._node_title = this._btn_close.previousSibling;
    this._btn_close.parent = this;
    this._btn_close.onclick = function() {
        Core.Events.stopEvent();
        if (a.hiddClose) {
            this.parent.hidd()
        } else {
            this.parent.close()
        }
    };
    this._btn_close.onmousedown = function() {};
    this._btn_move = this._btn_close.parentNode.parentNode;
    this._btn_move.parent = this;
    this._btn_move.onmousedown = function() {
        var k = Core.Events.fixEvent(Core.Events.getEvent());
        this.parent._ondrag = true;
        this.offsetx = k.layerX;
        this.offsety = k.layerY
    };
    this._btn_move.style.cursor = "pointer";
    var b = this;
    this._btn_move.mousemoveHandler = function() {
        b._mousemoveHandler()
    };
    this._btn_move.mouseupHandler = function() {
        b._mouserupHandler()
    };
    this._btn_move.resize = function() {
        b.resize()
    };
    this._btn_move.scroll = function() {
        b.scroll()
    };
    this.setMiddle();
    if (a.hidden) {
        f.visibility = "hidden";
        this.focusTarget = this._btn_close
    } else {
        f.visibility = "visible";
        this._btn_close.focus();
        this._btn_close.blur()
    }
    this.setMask(this._node.style.zIndex, a.hidden);
    Core.Events.addEvent(document, this._btn_move.mousemoveHandler, "mousemove");
    Core.Events.addEvent(document, this._btn_move.mouseupHandler, "mouseup");
    Core.Events.addEvent(window, this._btn_move.resize, "resize");
    Core.Events.addEvent(window, this._btn_move.scroll, "scroll")
};
App.Dialog.BasicDialog.prototype = {
    onClose: function() {},
    gc: function() {},
    distory: function() {
        if (this._distory) {
            return
        }
        this.gc();
        Core.Events.removeEvent(document, this._btn_move.mousemoveHandler, "mousemove");
        Core.Events.removeEvent(document, this._btn_move.mouseupHandler, "mouseup");
        Core.Events.removeEvent(window, this._btn_move.resize, "resize");
        Core.Events.removeEvent(window, this._btn_move.scroll, "scroll");
        this._btn_close.onmousedown = null;
        this._btn_close.onclick = null;
        this._btn_close.parent = null;
        this._btn_close = null;
        this._node.parentNode.removeChild(this._node);
        this._mask.parentNode.removeChild(this._mask);
        this._mask1.parentNode.removeChild(this._mask1);
        if (scope.$IE) {
            this._node.outerHTML = null;
            this._mask.outerHTML = null;
            this._mask1.outerHTML = null
        }
        this._node = null;
        this._btn_move.mousemoveHandler = null;
        this._btn_move.mouseupHandler = null;
        this._btn_move.resize = null;
        this._btn_move.scroll = null;
        this._btn_move.onmousedown = null;
        this._btn_move.parent = null;
        this._btn_move = null;
        this._mask = null;
        this._distory = true
    },
    close: function() {
        if (this.onClose) {
            this.onClose()
        }
        this.distory()
    },
    show: function() {
        this._node.style.visibility = "visible";
        this._mask.style.visibility = "visible";
        this._mask1.style.visibility = "visible";
        if (this.focusTarget) {
            this.focusTarget.focus()
        }
        this.resize();
        this.setMiddle()
    },
    hidd: function() {
        this._node.style.visibility = "hidden";
        this._mask.style.visibility = "hidden";
        this._mask1.style.visibility = "hidden"
    },
    setMask: function(z, hidden) {
        this._mask = document.getElementsByTagName("BODY")[0].appendChild($C("iframe"));
        this._mask1 = document.getElementsByTagName("BODY")[0].appendChild($C("div"));
        if (hidden) {
            this._mask.style.visibility = this._mask1.style.visibility = "hidden"
        }
        with(this._mask.style) {
            position = "absolute";
            width = "100%";
            zIndex = parseInt(z) - 2;
            top = "0px";
            left = "0px";
            border = "0"
        }
        with(this._mask1.style) {
            position = "absolute";
            backgroundColor = "#000";
            width = "100%";
            zIndex = parseInt(z) - 1;
            top = "0px";
            left = "0px"
        }
        Core.Dom.opacity(this._mask, 0);
        Core.Dom.opacity(this._mask1, 15);
        this.resize()
    },
    setPosition: function(a, b) {
        this._node.style.left = a + "px";
        this._node.style.top = b + "px"
    },
    resize: function() {
        if (this._mask) {
            var b = Core.System.getScrollPos();
            var a = Core.System.winSize();
            this._mask1.style.height = this._mask.style.height = (a.height + 160) + "px";
            this._mask1.style.top = this._mask.style.top = (b[0] - 80) + "px";
            this.setMiddle()
        }
    },
    scroll: function() {
        var a = Core.System.getScrollPos();
        var b = this._mask.offsetHeight;
        if ((a[0] + b) <= a[3]) {
            this._mask.style.top = this._mask1.style.top = (a[0] - 80) + "px"
        } else {
            this._mask.style.top = this._mask1.style.top = (a[3] - b) + "px"
        }
    },
    setTitle: function(a) {
        this._node_title.innerHTML = a
    },
    setMiddle: function() {
        var d = this._node.offsetWidth;
        var g = this._node.offsetHeight;
        var b = Core.System.winSize();
        var f = Core.System.getScrollPos();
        var c = (b.width - d) / 2;
        var a = f[0] + (b.height - g) / 2;
        this._node.style.left = c + "px";
        this._node.style.top = (a < 20 ? 20: a) + "px"
    },
    setSize: function(a, b) {
        a = a ? a + "px": "auto";
        b = b ? b + "px": "auto";
        var c = this._node_body.style;
        c.width = a;
        c.height = b
    },
    _mousemoveHandler: function() {
        if (this._ondrag) {
            var a = Core.Events.fixEvent(Core.Events.getEvent());
            if (a.target == this._btn_close) {
                return
            }
            if ($IE) {
                var b = Core.System.getScrollPos();
                this._node.style.left = a.pageX - this._btn_move.offsetx + b[1] + "px";
                this._node.style.top = a.pageY - this._btn_move.offsety + b[0] + "px"
            } else {
                this._node.style.left = a.pageX - this._btn_move.offsetx + "px";
                this._node.style.top = a.pageY - this._btn_move.offsety + "px"
            }
        }
    },
    _mouserupHandler: function() {
        this._ondrag = false;
        if (this._btn_move.offsetx) {
            this._btn_move.offsetx = null
        }
        if (this._btn_move.offsety) {
            this._btn_move.offsety = null
        }
    }
};
App.customDialog = function(l, c) {
    c = c ? c: {};
    var n = c.title ? c.title: $CLTMSG.CL0601;
    var f = {};
    f.width = c.width ? c.width: 360;
    f.height = c.height;
    f.zIndex = c.zIndex ? c.zIndex: 1000;
    f.hidden = c.hidden;
    var k = '#{cnt} <div class="layerBtn" id="btn_#{t}"></div>';
    var j = new Utils.Template(k);
    var p = (new Date()).getTime();
    var b = j.evaluate({
        cnt: l,
        t: p
    });
    var m = new App.Dialog.BasicDialog(n, b, f);
    var o = $E("btn_" + p);
    var g = c.btns;
    for (var h = 0; h < g.length; h++) {
        var a = o.appendChild($C("a"));
        a.className = "mBlogBtn";
        a.href = "javascript:;";
        if (g[h].select) {
            if (c.hidden) {
                this.focusTarget = a
            } else {
                a.focus()
            }
        }
        a.innerHTML = "<em>" + g[h].text + "</em>";
        a.nohide = c.btns[h].nohide;
        a.func = c.btns[h].func;
        a.onclick = function() {
            var q = this.nohide;
            if (this.func) {
                try {
                    this.func()
                } catch(r) {}
            }
            if (!q) {
                m.close()
            }
            return false
        }
    }
    function d() {
        var q = o.getElementsByTagName("A");
        for (var r in q) {
            q[r].nohide = null;
            q[r].func = null;
            q[r].onclick = null
        }
        o = null
    }
    m.close = function() {
        m.onClose();
        d();
        m.distory()
    };
    return m
};
if (!App.getMsg) {
    App.getMsg = function(b, a) {
        alert("you should override this function! get more help from dialog.js ");
        return b
    }
}
App.Dialog.newBasicDialog = function(j, g, a) {
    this._node = $C("div");
    document.getElementsByTagName("BODY")[0].appendChild(this._node);
    var c = {
        title: j ? j: "newBasicDialog",
        content: g ? g: "......"
    };
    var f = this._node.style;
    f.position = "absolute";
    f.visibility = "hidden";
    if (!a) {
        a = {}
    }
    if (a.zIndex) {
        f.zIndex = a.zIndex
    }
    if (a.hidden) {
        f.visibility = "hidden"
    }
    var h = '<table class="mBlogLayer mBlogLayer_new"><tbody><tr><td class="top_l"></td><td class="top_c"></td><td class="top_r"></td></tr><tr><td class="mid_l"></td><td class="mid_c"><div class="layerBox"><div class="layerBoxTop"><div class="topCon"><strong>#{title}</strong><a href="javascript:;" class="close"></a><div class="clearit"></div></div></div><div class="layerBoxCon">#{content}</div></div></td><td class="mid_r"></td></tr><tr><td class="bottom_l"></td><td class="bottom_c"></td><td class="bottom_r"></td></tr><tbody></table>';
    var d = new Utils.Template(h);
    this._node.innerHTML = d.evaluate(c);
    this._node_body = Core.Dom.getElementsByClass(this._node, "DIV", "layerBoxCon")[0];
    this.setSize(a.width, a.height);
    this._btn_close = this._node.firstChild.firstChild.childNodes[1].childNodes[1].firstChild.firstChild.firstChild.childNodes[1];
    this._node_title = this._btn_close.previousSibling;
    this._btn_close.parent = this;
    this._btn_close.onclick = function() {
        Core.Events.stopEvent();
        if (a.hiddClose) {
            this.parent.hidd()
        } else {
            this.parent.close()
        }
    };
    this._btn_close.onmousedown = function() {};
    this._btn_move = this._btn_close.parentNode.parentNode;
    this._btn_move.parent = this;
    this._btn_move.onmousedown = function() {
        var k = Core.Events.fixEvent(Core.Events.getEvent());
        this.parent._ondrag = true;
        this.offsetx = k.layerX;
        this.offsety = k.layerY
    };
    this._btn_move.style.cursor = "pointer";
    var b = this;
    this._btn_move.mousemoveHandler = function() {
        b._mousemoveHandler()
    };
    this._btn_move.mouseupHandler = function() {
        b._mouserupHandler()
    };
    this._btn_move.resize = function() {
        b.resize()
    };
    this._btn_move.scroll = function() {
        b.scroll()
    };
    this.setMiddle();
    if (a.hidden) {
        f.visibility = "hidden";
        this.focusTarget = this._btn_close
    } else {
        f.visibility = "visible";
        this._btn_close.focus();
        this._btn_close.blur()
    }
    this.setMask(this._node.style.zIndex, a.hidden);
    Core.Events.addEvent(document, this._btn_move.mousemoveHandler, "mousemove");
    Core.Events.addEvent(document, this._btn_move.mouseupHandler, "mouseup");
    Core.Events.addEvent(window, this._btn_move.resize, "resize");
    Core.Events.addEvent(window, this._btn_move.scroll, "scroll")
};
App.Dialog.newBasicDialog.prototype = {
    onClose: function() {},
    gc: function() {},
    distory: function() {
        if (this._distory) {
            return
        }
        this.gc();
        Core.Events.removeEvent(document, this._btn_move.mousemoveHandler, "mousemove");
        Core.Events.removeEvent(document, this._btn_move.mouseupHandler, "mouseup");
        Core.Events.removeEvent(window, this._btn_move.resize, "resize");
        Core.Events.removeEvent(window, this._btn_move.scroll, "scroll");
        this._btn_close.onmousedown = null;
        this._btn_close.onclick = null;
        this._btn_close.parent = null;
        this._btn_close = null;
        this._node.parentNode.removeChild(this._node);
        this._mask.parentNode.removeChild(this._mask);
        this._mask1.parentNode.removeChild(this._mask1);
        if (scope.$IE) {
            this._node.outerHTML = null;
            this._mask.outerHTML = null;
            this._mask1.outerHTML = null
        }
        this._node = null;
        this._btn_move.mousemoveHandler = null;
        this._btn_move.mouseupHandler = null;
        this._btn_move.resize = null;
        this._btn_move.scroll = null;
        this._btn_move.onmousedown = null;
        this._btn_move.parent = null;
        this._btn_move = null;
        this._mask = null;
        this._distory = true
    },
    close: function() {
        if (this.onClose) {
            this.onClose()
        }
        this.distory()
    },
    show: function() {
        this._node.style.visibility = "visible";
        this._mask.style.visibility = "visible";
        this._mask1.style.visibility = "visible";
        if (this.focusTarget) {
            this.focusTarget.focus()
        }
        this.resize();
        this.setMiddle()
    },
    hidd: function() {
        this._node.style.visibility = "hidden";
        this._mask.style.visibility = "hidden";
        this._mask1.style.visibility = "hidden"
    },
    setMask: function(z, hidden) {
        this._mask = document.getElementsByTagName("BODY")[0].appendChild($C("iframe"));
        this._mask1 = document.getElementsByTagName("BODY")[0].appendChild($C("div"));
        if (hidden) {
            this._mask.style.visibility = this._mask1.style.visibility = "hidden"
        }
        with(this._mask.style) {
            position = "absolute";
            width = "100%";
            zIndex = parseInt(z) - 2;
            top = "0px";
            left = "0px";
            border = "0"
        }
        with(this._mask1.style) {
            position = "absolute";
            backgroundColor = "#000";
            width = "100%";
            zIndex = parseInt(z) - 1;
            top = "0px";
            left = "0px"
        }
        Core.Dom.opacity(this._mask, 0);
        Core.Dom.opacity(this._mask1, 15);
        this.resize()
    },
    setPosition: function(a, b) {
        this._node.style.left = a + "px";
        this._node.style.top = b + "px"
    },
    resize: function() {
        if (this._mask) {
            var b = Core.System.getScrollPos();
            var a = Core.System.winSize();
            this._mask1.style.height = this._mask.style.height = (a.height + 160) + "px";
            this._mask1.style.top = this._mask.style.top = (b[0] - 80) + "px";
            this.setMiddle()
        }
    },
    scroll: function() {
        var a = Core.System.getScrollPos();
        var b = this._mask.offsetHeight;
        if ((a[0] + b) <= a[3]) {
            this._mask.style.top = this._mask1.style.top = (a[0] - 80) + "px"
        } else {
            this._mask.style.top = this._mask1.style.top = (a[3] - b) + "px"
        }
    },
    setTitle: function(a) {
        this._node_title.innerHTML = a
    },
    setMiddle: function() {
        var d = this._node.offsetWidth;
        var g = this._node.offsetHeight;
        var b = Core.System.winSize();
        var f = Core.System.getScrollPos();
        var c = (b.width - d) / 2;
        var a = f[0] + (b.height - g) / 2;
        this._node.style.left = c + "px";
        this._node.style.top = (a < 20 ? 20: a) + "px"
    },
    setSize: function(a, b) {
        a = a ? a + "px": "auto";
        b = b ? b + "px": "auto";
        var c = this._node_body.style;
        c.width = a;
        c.height = b
    },
    _mousemoveHandler: function() {
        if (this._ondrag) {
            var a = Core.Events.fixEvent(Core.Events.getEvent());
            if (a.target == this._btn_close) {
                return
            }
            if ($IE) {
                var b = Core.System.getScrollPos();
                this._node.style.left = a.pageX - this._btn_move.offsetx + b[1] + "px";
                this._node.style.top = a.pageY - this._btn_move.offsety + b[0] + "px"
            } else {
                this._node.style.left = a.pageX - this._btn_move.offsetx + "px";
                this._node.style.top = a.pageY - this._btn_move.offsety + "px"
            }
        }
    },
    _mouserupHandler: function() {
        this._ondrag = false;
        if (this._btn_move.offsetx) {
            this._btn_move.offsetx = null
        }
        if (this._btn_move.offsety) {
            this._btn_move.offsety = null
        }
    }
};
App.alert = function(b, c) {
    c = c ? c: {};
    c.hasBtn = c.hasBtn == null ? true: c.hasBtn;
    var m = c.title ? c.title: $CLTMSG.CL0601;
    var r = c.ok_label ? c.ok_label: $CLTMSG.CL0602;
    var a;
    if (typeof b == "object") {
        a = b.errorTitle ? b.errorTitle: "";
        b = App.getMsg(b.code, b.replace)
    }
    var p = c.ok ? c.ok: null;
    var d = {};
    d.width = c.width && c.width > 370 ? c.width: 370;
    d.height = c.height;
    d.zIndex = c.zIndex ? c.zIndex: 1000;
    d.hidden = c.hidden;
    var n = [];
    n.push('<div class="commonLayer2 commonLayer_tips">');
    n.push('<div class="tips_lr"><span class="#{iconClass}"></span>');
    if (a && a != "" && c && c.icon == 1) {
        n.push('<em class="err">' + a + '<i class="mbTxtC">#{cnt}</i></em></div>')
    } else {
        if (a && a != "" && c && (c.icon == 3 || c.icon == 5)) {
            n.push("<em>" + a + '<i class="mbTxtC">#{cnt}</i></em></div>')
        } else {
            n.push("<em>#{cnt}</em></div>")
        }
    }
    n.push('<div class="txt_r"><a class="addNewSite_submit" id="#{btn_id}" href="javascript:;"><em>' + r + "</em></a></div>");
    n.push("</div>");
    var f = new Utils.Template(n.join(""));
    var q = "btn_" + (new Date()).getTime();
    var l = c.icon ? c.icon: 1;
    var k;
    switch (l) {
    case 1:
        k = "icon_errorM";
        break;
    case 2:
        k = "icon_delM";
        break;
    case 3:
        k = "icon_succM";
        break;
    case 4:
        k = "icon_questionM";
        break;
    case 5:
        k = "icon_warnM";
        break;
    case "1":
        k = "icon_errorM";
        break;
    case "2":
        k = "icon_succM";
        break;
    case "3":
        k = "icon_delM";
        break;
    case "4":
        k = "icon_questionM";
        break;
    default:
        k = "icon_errorM"
    }
    b = f.evaluate({
        cnt: b,
        iconClass: k,
        btn_id: q
    });
    var h = new App.Dialog.newBasicDialog(m, b, d);
    var j = $E(q);
    var g = function() {
        if (p) {
            try {
                p()
            } catch(s) {}
        }
        p = null;
        j.onclick = null;
        j = null;
        h.close();
        Core.Events.removeEvent(document, o, "keyup");
        return false
    };
    var o = function(u) {
        var t = window.event || u;
        var s;
        if (t.target) {
            s = u.target
        } else {
            if (t.srcElement) {
                s = u.srcElement
            }
        }
        if (s.nodeType == 3) {
            s = s.parentNode
        }
        if (s.tagName == "INPUT" || s.tagName == "TEXTAREA") {
            return
        }
        switch (t.keyCode) {
        case 27:
            g();
            break
        }
    };
    j.onclick = g;
    Core.Events.addEvent(document, o, "keyup");
    if (d.hidden) {
        this.focusTarget = j
    } else {
        j.focus()
    }
    return h
};
App.confirm = function(d, q) {
    q = q ? q: {};
    var u = q.title ? q.title: $CLTMSG.CL0601;
    var s = q.ok_label ? q.ok_label: $CLTMSG.CL0602;
    var l = q.cancel_label ? q.cancel_label: $CLTMSG.CL0603;
    var c = "";
    if (typeof d == "object") {
        c = d.des;
        if (d.code) {
            d = App.getMsg(d.code, d.replace)
        } else {
            d = d.html
        }
    }
    var f = q.ok ? q.ok: null;
    var o = q.cancel ? q.cancel: null;
    var j = {};
    j.width = q.width ? q.width: 390;
    j.height = q.height;
    j.zIndex = q.zIndex ? q.zIndex: 1000;
    j.hidden = q.hidden;
    var v = '<div class="commonLayer2 commonLayer_tips"><div class="tips_lr"><span class="#{iconClass}"></span><em>#{cnt}</em></div><div class="txt_r"><a href="javascript:;" id="ok_#{t}" class="addNewSite_submit"><em>' + s + '</em></a><a href="javascript:;" id="cancel_#{t}" class="btnnew_norS"><em>' + l + "</em></a></div></div>";
    var p = new Utils.Template(v);
    var h = (new Date()).getTime();
    var m = q.icon ? q.icon: 4;
    var a;
    switch (m) {
    case 1:
        a = "icon_errorM";
        break;
    case 2:
        a = "icon_delM";
        break;
    case 3:
        a = "icon_succM";
        break;
    case 4:
        a = "icon_questionM";
        break;
    case "1":
        a = "icon_errorM";
        break;
    case "2":
        a = "icon_succM";
        break;
    case "3":
        a = "icon_delM";
        break;
    case "4":
        a = "icon_questionM";
        break;
    default:
        a = "icon_errorM"
    }
    d = p.evaluate({
        cnt: d,
        des: c,
        iconClass: a,
        t: h
    });
    var k = new App.Dialog.newBasicDialog(u, d, j);
    var r = $E("ok_" + h);
    var n = $E("cancel_" + h);
    var g = function(x) {
        var w = window.event || x;
        var t;
        if (w.target) {
            t = x.target
        } else {
            if (w.srcElement) {
                t = x.srcElement
            }
        }
        if (t.nodeType == 3) {
            t = t.parentNode
        }
        if (t.tagName == "INPUT" || t.tagName == "TEXTAREA") {
            return
        }
        switch (w.keyCode) {
        case 27:
            b();
            break
        }
    };
    var b = function() {
        if (o) {
            try {
                o()
            } catch(t) {}
        }
        o = null;
        r.onclick = null;
        n.onclick = null;
        n = null;
        r = null;
        k.distory();
        k = null;
        Core.Events.removeEvent(document, g, "keyup");
        return false
    };
    r.onclick = function() {
        if (f) {
            try {
                f()
            } catch(t) {}
        }
        f = null;
        r.onclick = null;
        n.onclick = null;
        n = null;
        r = null;
        k.distory();
        k = null;
        Core.Events.removeEvent(document, g, "keyup");
        return false
    };
    n.onclick = b;
    if (q.ok_focus) {
        if (q.hidden) {
            this.focusTarget = r
        } else {
            r.focus()
        }
    } else {
        if (q.cancel_focus) {
            if (q.hidden) {
                this.focusTarget = n
            } else {
                n.focus()
            }
        }
    }
    Core.Events.addEvent(document, g, "keyup");
    return k
};
App.getMsg = function(a, c) {
    if (a === undefined) {
        return ""
    }
    if (typeof(a) == "object") {
        a = a.code
    }
    var d = $SYSMSG[a] || $CLTMSG[a] || ("Error[" + a + "]");
    if (c) {
        var b = new Utils.Template(d);
        return b.evaluate(c)
    } else {
        return d
    }
};
Sina.pkg("Utils.Io");
Utils.Url = function(a) {
    a = a || "";
    this.url = a;
    this.query = {};
    this.parse()
};
Utils.Url.prototype = {
    parse: function(a) {
        if (a) {
            this.url = a
        }
        this.parseAnchor();
        this.parseParam()
    },
    parseAnchor: function() {
        var a = this.url.match(/\#(.*)/);
        a = a ? a[1] : null;
        this._anchor = a;
        if (a != null) {
            this.anchor = this.getNameValuePair(a);
            this.url = this.url.replace(/\#.*/, "")
        }
    },
    parseParam: function() {
        var a = this.url.match(/\?([^\?]*)/);
        a = a ? a[1] : null;
        if (a != null) {
            this.url = this.url.replace(/\?([^\?]*)/, "");
            this.query = this.getNameValuePair(a)
        }
    },
    getNameValuePair: function(b) {
        var a = {};
        b.replace(/([^&=]*)(?:\=([^&]*))?/gim, 
        function(c, f, d) {
            if (f == "") {
                return
            }
            a[f] = d || ""
        });
        return a
    },
    getParam: function(a) {
        return this.query[a] || ""
    },
    clearParam: function() {
        this.query = {}
    },
    setParam: function(a, b) {
        if (a == null || a == "" || typeof(a) != "string") {
            throw new Error("no param name set")
        }
        this.query = this.query || {};
        this.query[a] = b
    },
    setParams: function(a) {
        this.query = a
    },
    serialize: function(c) {
        var a = [];
        for (var b in c) {
            if (c[b] == null || c[b] == "") {
                a.push(b + "=")
            } else {
                a.push(b + "=" + c[b])
            }
        }
        return a.join("&")
    },
    toString: function() {
        var a = this.serialize(this.query);
        return this.url + (a.length > 0 ? "?" + a: "") + (this.anchor ? "#" + this.serialize(this.anchor) : "")
    },
    getHashStr: function(a) {
        return this.anchor ? "#" + this.serialize(this.anchor) : (a ? "#": "")
    }
};
Core.String.encodeDoubleByte = function(a) {
    if (typeof a != "string") {
        return a
    }
    return encodeURIComponent(a)
};
Utils.Io.Ajax = {
    createRequest: function() {
        var c = null;
        try {
            c = new XMLHttpRequest()
        } catch(b) {
            try {
                c = new ActiveXObject("Msxml2.XMLHTTP")
            } catch(d) {
                try {
                    c = ActiveXObject("Microsoft.XMLHTTP")
                } catch(a) {}
            }
        }
        if (c == null) {
            $Debug.error("<b>create request failed</b>", {
                html: true
            })
        } else {
            return c
        }
    },
    request: function(a, b) {
        b = b || {};
        b.onComplete = b.onComplete || 
        function() {};
        b.onException = b.onException || 
        function() {};
        b.returnType = b.returnType || "txt";
        b.method = b.method || "get";
        b.data = b.data || {};
        if (typeof b.GET != "undefined" && typeof b.GET.url_random != "undefined" && b.GET.url_random == 0) {
            this.rand = false;
            b.GET.url_random = null
        }
        this.loadData(a, b)
    },
    loadData: function(url, option) {
        var request = this.createRequest(),
        tmpArr = [];
        var _url = new Utils.Url(url);
        if (option.POST) {
            for (var postkey in option.POST) {
                var postvalue = option.POST[postkey];
                if (postvalue != null) {
                    tmpArr.push(postkey + "=" + Core.String.encodeDoubleByte(postvalue))
                }
            }
        }
        var sParameter = tmpArr.join("&") || "";
        if (option.GET) {
            for (var key in option.GET) {
                if (key != "url_random") {
                    _url.setParam(key, Core.String.encodeDoubleByte(option.GET[key]))
                }
            }
        }
        if (this.rand != false) {
            _url.setParam("rnd", Math.random())
        }
        request.onreadystatechange = function() {
            if (request.readyState == 4) {
                var response,
                type = option.returnType;
                try {
                    switch (type) {
                    case "txt":
                        response = request.responseText;
                        break;
                    case "xml":
                        if (Core.Base.detect.$IE) {
                            response = request.responseXML
                        } else {
                            var Dparser = new DOMParser();
                            response = Dparser.parseFromString(request.responseText, "text/xml")
                        }
                        break;
                    case "json":
                        response = eval("(" + request.responseText + ")");
                        break
                    }
                    option.onComplete(response)
                } catch(e) {
                    option.onException(e.message, _url);
                    return false
                }
            }
        };
        try {
            if (option.POST) {
                request.open("POST", _url, true);
                request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                request.send(sParameter)
            } else {
                request.open("GET", _url, true);
                request.send(null)
            }
        } catch(e) {
            option.onException(e.message, _url);
            return false
        }
    }
}; (function() {
    App.doAjaxRequest = function(b, d, a) {
        var a = a || {};
        a.key = a.key || "A00006";
        var c = function(g) {
            var h = $SYSMSG[(g && g.code || "A00001")];
            App.alert(h)
        };
        var f = function(h) {
            if (h && h.code == "A00006") {
                if (a.onSucc && a.onSucc(h)) {
                    return
                }
                var j = App.alert($CLTMSG[a.key] || $SYSMSG[a.key], {
                    icon: 3
                });
                var g = setTimeout(function() {
                    try {
                        j && (j.close())
                    } catch(k) {}
                },
                2000);
                j.onClose = function() {
                    clearTimeout(g);
                    j = null;
                    a.cbfun && a.cbfun(h)
                };
                return false
            }
            c(h)
        };
        Utils.Io.Ajax.request(b, {
            POST: d,
            onComplete: f,
            onException: c,
            returnType: "json"
        })
    }
})(); (function() {
    var a = {};
    a.prov0 = $CLTMSG.CX0078;
    a.code0 = "0";
    a.prov34 = $CLTMSG.CX0079;
    a.code34 = "1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18";
    a.prov11 = $CLTMSG.CX0080;
    a.code11 = "1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,28,29";
    a.prov50 = $CLTMSG.CX0081;
    a.code50 = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,40,41,42,43,81,82,83,84";
    a.prov35 = $CLTMSG.CX0082;
    a.code35 = "1,2,3,4,5,6,7,8,9";
    a.prov62 = $CLTMSG.CX0083;
    a.code62 = "1,2,3,4,5,6,7,8,9,10,24,26,29,30";
    a.prov44 = $CLTMSG.CX0084;
    a.code44 = "1,2,3,4,5,6,7,8,9,12,13,14,15,16,17,18,19,20,51,52,53";
    a.prov45 = $CLTMSG.CX0085;
    a.code45 = "1,2,3,4,5,6,7,8,9,10,11,12,21,22";
    a.prov52 = $CLTMSG.CX0086;
    a.code52 = "1,2,3,4,22,23,24,26,27";
    a.prov46 = $CLTMSG.CX0087;
    a.code46 = "1,2,90";
    a.prov13 = $CLTMSG.CX0088;
    a.code13 = "1,2,3,4,5,6,7,8,9,10,11";
    a.prov23 = $CLTMSG.CX0089;
    a.code23 = "1,2,3,4,5,6,7,8,9,10,11,12,27";
    a.prov41 = $CLTMSG.CX0090;
    a.code41 = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17";
    a.prov42 = $CLTMSG.CX0091;
    a.code42 = "1,2,3,5,6,7,8,9,10,11,12,13,28";
    a.prov43 = $CLTMSG.CX0092;
    a.code43 = "1,2,3,4,5,6,7,8,9,10,11,12,13,31";
    a.prov15 = $CLTMSG.CX0093;
    a.code15 = "1,2,3,4,5,6,7,22,25,26,28,29";
    a.prov32 = $CLTMSG.CX0094;
    a.code32 = "1,2,3,4,5,6,7,8,9,10,11,12,13";
    a.prov36 = $CLTMSG.CX0095;
    a.code36 = "1,2,3,4,5,6,7,8,9,10,11";
    a.prov22 = $CLTMSG.CX0096;
    a.code22 = "1,2,3,4,5,6,7,8,24";
    a.prov21 = $CLTMSG.CX0097;
    a.code21 = "1,2,3,4,5,6,7,8,9,10,11,12,13,14";
    a.prov64 = $CLTMSG.CX0098;
    a.code64 = "1,2,3,4";
    a.prov63 = $CLTMSG.CX0099;
    a.code63 = "1,21,22,23,25,26,27,28";
    a.prov14 = $CLTMSG.CX0100;
    a.code14 = "1,2,3,4,5,6,7,8,9,10,23";
    a.prov37 = $CLTMSG.CX0101;
    a.code37 = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17";
    a.prov31 = $CLTMSG.CX0102;
    a.code31 = "1,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,30";
    a.prov51 = $CLTMSG.CX0103;
    a.code51 = "1,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,32,33,34";
    a.prov12 = $CLTMSG.CX0104;
    a.code12 = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,21,23,25";
    a.prov54 = $CLTMSG.CX0105;
    a.code54 = "1,21,22,23,24,25,26";
    a.prov65 = $CLTMSG.CX0106;
    a.code65 = "1,2,21,22,23,27,28,29,30,31,32,40,42,43,44";
    a.prov53 = $CLTMSG.CX0107;
    a.code53 = "1,3,4,5,6,23,25,26,27,28,29,31,32,33,34,35";
    a.prov33 = $CLTMSG.CX0108;
    a.code33 = "1,2,3,4,5,6,7,8,9,10,11";
    a.prov61 = $CLTMSG.CX0109;
    a.code61 = "1,2,3,4,5,6,7,8,9,10";
    a.prov71 = $CLTMSG.CX0110;
    a.code71 = "1,2,90";
    a.prov81 = $CLTMSG.CX0111;
    a.code81 = "1";
    a.prov82 = $CLTMSG.CX0112;
    a.code82 = "1";
    a.prov400 = $CLTMSG.CX0113;
    a.code400 = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16";
    a.prov100 = "";
    a.code100 = "";
    a.provinces = $CLTMSG.CX0114;
    a.provcodes = "34,11,50,35,62,44,45,52,46,13,23,41,42,43,15,32,36,22,21,64,63,14,37,31,51,12,54,65,53,33,61,71,81,82,400,100";
    App.ProvinceAndCity = function(c, f, b, d) {
        this.provDom = c;
        this.cityDom = f;
        this.provCode = b;
        this.cityCode = d;
        this.init()
    }; (function(b) {
        b.init = function() {
            this.loadProv();
            this.loadCity();
            Core.Events.addEvent(this.provDom, (function(c) {
                return function() {
                    c.cityCode = 1000;
                    c.provCode = c.provDom.value;
                    c.loadCity()
                }
            })(this), "change")
        };
        b.disp = function() {};
        b.loadProv = function() {
            var d = this.provDom.options;
            var g = a.provcodes.split(",");
            var f = a.provinces.split(",");
            if (d.length <= 1) {
                d[0] = new Option($CLTMSG.CX0115, 0);
                for (var h = 0, c = g.length; h < c; h++) {
                    d[d.length] = new Option(f[h], g[h])
                }
            }
            if (Core.Array.findit(g, this.provCode) != -1) {
                this.provDom.value = this.provCode
            } else {
                this.provDom.value = 0
            }
        };
        b.loadCity = function() {
            if (this.provCode == "1001") {
                this.cityDom.style.display = "none";
                this.cityDom.disabled = true;
                return false
            } else {
                this.cityDom.disabled = false;
                this.cityDom.style.display = ""
            }
            var h = this.cityDom.options;
            while (h.length) {
                this.cityDom.remove(0)
            }
            var d = a["code" + this.provCode].split(",");
            var g = a["prov" + this.provCode].split(",");
            h[0] = new Option($CLTMSG.CX0116, 1000);
            for (var f = 0, c = d.length; f < c; f++) {
                if (g[f] && d[f]) {
                    h[h.length] = new Option(g[f], d[f])
                }
            }
            if (Core.Array.findit(d, this.cityCode) != -1) {
                this.cityDom.value = this.cityCode
            } else {
                this.cityDom.value = 1000
            }
        };
        b.loadNewData = function(c, d) {
            this.provCode = c;
            this.cityCode = d;
            this.loadProv();
            this.loadCity()
        }
    })(App.ProvinceAndCity.prototype)
})();
App.sendMail = function() {
    var a = function(b) {
        if (!b) {
            return
        }
        setTimeout(function() {
            location.href = b
        },
        0)
    };
    Utils.Io.Ajax.request("/developers/ajax_sendmail.php", {
        onComplete: function(c) {
            var d = c && c.code || "-1";
            if (d == "A00006") {
                setTimeout(function() {
                    location.href = c.data
                },
                0)
            } else {
                var f = c && c.msg || "发送邮件失败";
                var b = c && c.data;
                b ? a(b) : App.alert(f)
            }
        },
        onException: function() {},
        returnType: "json",
        GET: {
            backurl: $E("backurl") ? $E("backurl").value: ""
        }
    })
};
App.sendMailConfirm = function(a) {
    if (!a) {
        return
    }
    a = decodeURIComponent(a);
    App.confirm("将向" + a + "发送验证邮件", {
        ok: function() {
            App.sendMail()
        },
        cancel: function() {}
    })
};
Jobs.regist("edit_information", 
function() {
    if (!$E("wrapper")) {
        return
    }
    var n = Core.String.trim;
    var c = App.checkMiniName;
    var d = App.htmlToJson;
    var f = Core.Events.addEvent;
    var o = Core.String.byteLength;
    var g = Core.Array.foreach;
    function j(r, p, s, q) {
        if (q.key && q.key !== r && p) {
            return false
        } else {
            b(r, p, q)
        }
    }
    function b(r, p, q) {
        if (p) {
            q.key = false;
            q.innerHTML = '<div class="M_notice_succ"><span class="icon_succ"></span></div>'
        } else {
            var s = $CLTMSG[r] || $SYSMSG[r] || r;
            q.key = r;
            q.innerHTML = '<div class="M_notice_warn"><span class="icon_error"></span><span class="txt">' + s + "</span></div>"
        }
    }
    var k = {
        d_name: "CF0322,CF0321,CF0332,CF0333",
        d_mail: "CF0324,CF0323",
        d_phone: "CF0325,CF0326",
        d_site: "CF0923,CF0924,CF0338",
        chat_num: "CF0337,CF0329",
        d_contact_person: "CF0713,CF0332,CF0333",
        d_contact_phone: "CF0325,CF0326",
        city: "CF0708"
    };
    var h = {
        CF0321: function(p) {
            return App.checkEmpty(p.value)
        },
        CF0322: function(p) {
            return o(n(p.value)) <= 20
        },
        CF0324: function(p) {
            return App.checkEml(p.value)
        },
        CF0326: function(p) {
            return /^[+]?[0-9]+([xX-][0-9]+)*$/.test(p.value || "") && p.value.length <= 30
        },
        CF0924: function(p) {
            return (!App.checkEmpty(p.value)) || App.checkURLoose(p.value)
        },
        CF0332: function(p) {
            var q = p.value;
            return /^[\w\u4e00-\u9fa5.]*$/.test(n(q))
        },
        CF0333: function(p) {
            var q = p.value;
            return ! (/^[_.]+|[_.]+$/.test(n(q)))
        },
        CF0337: function(p) {
            var q = n(p.value);
            var r = App.checkEml(q);
            if ($E("chat_type").value == 3) {
                return /^[1-9]\d{4}\d{0,7}$/.test(q) || r
            }
            return r
        },
        CF0338: function(p) {
            return o(n(p.value)) <= 500
        },
        CF0708: function(p) {
            if ($E("province").value == 100) {
                return true
            }
            return $E("city").value != "0" && $E("province").value != "0" && $E("city").value != "1000"
        },
        CF0713: function(p) {
            return App.checkEmpty(p.value)
        }
    };
    h.CF0323 = h.CF0321;
    h.CF0325 = h.CF0321;
    h.CF0923 = h.CF0321;
    h.CF0329 = h.CF0321;
    var m = App.checkForm(j); (function() {
        for (var p in k) {
            if ($E(p)) {
                g(k[p].split(","), 
                function(q, r) {
                    m.add(q, $E(p), $E(p + "_error"), h[q])
                })
            }
        }
    })(); (function() {
        var r = {};
        var q = $E("chat_type").value;
        r[q] = $E("chat_num").value;
        var p = $E("chat_num_error").innerHTML;
        f($E("chat_type"), 
        function() {
            var s = $E("chat_type").value;
            $E("chat_num").value = r[s] || "";
            $E("chat_num_error").innerHTML = p;
            setTimeout(function() {
                $E("chat_num").select()
            },
            0)
        },
        "change");
        f($E("chat_num"), 
        function() {
            var s = $E("chat_type").value;
            r[s] = $E("chat_num").value
        },
        "blur")
    })(); (function() {
        var p = $E("province");
        var r = $E("city");
        if (!p || !r) {
            return
        }
        f(p, 
        function() {
            setTimeout(function() {
                Core.Events.fireEvent(r, "change")
            },
            10)
        },
        "change");
        var q = p.getAttribute("truevalue") || "0";
        var s = r.getAttribute("truevalue") || "0";
        new App.ProvinceAndCity(p, r, q, s)
    })();
    App.sendMailDialog = function(p) {
        if (scope.$mailstatus && scope.$mailstatus != "1") {
            return
        }
        App.sendMailConfirm(encodeURIComponent($E("d_mail").value))
    };
    var l = function(r) {
        var p = window.location.href;
        var q = new Utils.Url(p);
        q.setParam("dev_type", r);
        window.location.href = q.toString()
    };
    var a = document.getElementsByName("type");
    g(a, 
    function(p, q) {
        f(p, 
        function() {
            l(p.value)
        },
        "click")
    }); (function() {
        f($E("submit"), 
        function() {
            if (!m.check()) {
                return
            }
            var p = App.htmlToJson($E("wrapper"));
            p.mail = $E("d_mail").value;
            App.doAjaxRequest("/developers/ajax_basicinfo_save.php", p, {
                onSucc: function(t) {
                    if (!t || !t.data) {
                        return
                    }
                    var u = function() {
                        setTimeout(function() {
                            location.href = t.data
                        },
                        0)
                    };
                    if (scope.$mailstatus == 1) {
                        var q;
                        var s = App.confirm("将向" + $E("d_mail").value + "发送验证邮件", {
                            ok: function() {
                                clearTimeout(q);
                                App.sendMail()
                            },
                            cancel: function() {
                                u()
                            }
                        });
                        s.onClose = function() {
                            q = setTimeout(u, 500)
                        }
                    } else {
                        u()
                    }
                    return true
                }
            })
        },
        "click")
    })()
});